<template>
  <div>
    <h3>具名子组件</h3>
    <slot name="juming"></slot>
    <h3>具名子组件</h3>
  </div>
</template>
<script setup lang="ts">
import { useSlots } from "vue";

const mySlots = useSlots();

if (mySlots && mySlots.juming && mySlots.juming()) {
  console.log(mySlots.juming());
}
</script>
<style lang="scss" scoped></style>
